﻿@using MvcPaging
@model IPagedList<MvcApplication5.Models.News> 

@{
    ViewBag.Title = "PublishWaitList";
    Layout = "~/Views/News/AdminLayout.cshtml";
}

<h2>Bài nhận duyệt</h2>
@using(Html.BeginForm()){
<table border="1">
    <tr class="news-header">
        <th><input type="checkbox" /></th>
        <th style="width:832px;">Tiêu đề tin</th>
        <th style="width:100px;">Chuyên mục</th>
        <th style="width:130px;"></th>        
    </tr>
    @foreach (var item in Model)
    {
        var Author = item.Author != null ? item.Author.Name : "";
        <tr class="news-content">
            <td><input type="checkbox" id="chkBox" name="chkBox" value="@item.NewsId"/></td>
            <td style="width:832px; padding-left:5px;">
                <a href="/News/Edit/@item.NewsId?UserType=@ViewBag.UserType&FromPage=@ViewBag.Title" class="news-title">@item.Title</a>
                <p class="news-subtitle">Tác giả: @Author, lần sửa cuối: @item.LastModifiedDate, người sửa: @item.LastModifiedBy</p>
            </td>
            <td class="news-text">@Html.DisplayFor(modelItem => item.Category.Name)</td>
            <td style="width:130px;"></td>
        </tr>
    }
    <tr>
        <td colspan="4" style="border:none;">@Html.Pager(Model.PageSize, Model.PageNumber, Model.TotalItemCount)</td>
    </tr>        
</table>
    <div class="news-command"><input type="submit" name="submitButton" value="Trả tin đã chọn"/></div>        
    <div class="news-command"><input type="submit" name="submitButton" value="Xóa tin đã chọn"/></div>    
}
